<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<div>
	<div id="comment_div">
	    <input type="hidden" id="pageCount" value="${pagedComments==null?0:pagedComments.totalPages}"/>
	    <input type="hidden" id="curPage" value="${pagedComments.number}"/>
		<c:if test="${pagedComments.content==null||fn:length(pagedComments.content)==0}">
			<div class="maincont2right4">
				<p>「暂无评价」</p>
			</div>
		</c:if>
		<c:forEach items="${pagedComments.content}" var="comment">
			<div class="maincont2right2">
				<div class="maincont2right3">
					<h1>${comment.member.name}</h1>
					<p><fmt:formatDate value="${comment.addtime }" pattern="yyyy-MM-dd HH:mm:ss" /> </p>
				</div>
				<div class="maincont2right4">
					<p>${comment.content}</p>
					<c:if test="${comment.image!=null}">
						<div style="width: 430px;">
							<c:forEach begin="1" end="5" step="1" var="i">
								<c:set var="imageKey" value="image${i==1?'':i}" />
								<c:if test="${comment[imageKey]!=null&&comment[imageKey]!=''}">
									<img src="${comment[imageKey]}" class="magnify" style="width: 50px; height: 50px" />
								</c:if>
							</c:forEach>
						</div>
					</c:if>
				</div>
				<div class="maincont2right5">
					<c:forEach begin="1" end="5" step="1" varStatus="index">
						<c:choose>
							<c:when test="${index.index<=comment.scores}">
								<img src="${staticPath}/pcimages/pingjia1.png" style="width: 20px; height: 20px; margin-top: 20px; float: left;" />
							</c:when>
							<c:otherwise>
								<img src="${staticPath}/pcimages/pingjia2.png" style="width: 20px; height: 20px; margin-top: 20px; float: left;" />
							</c:otherwise>
						</c:choose>
					</c:forEach>
				</div>
			</div>
		</c:forEach>
	</div>
</div>